package cn.yedong.pet.domain;

import java.math.BigDecimal;
import java.util.Date;
import cn.yedong.basic.domain.BaseDomain;
import cn.yedong.org.domain.Shop;
import cn.yedong.user.domain.User;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

/**
 * 实体类：
 */
@Data
public class Pet extends BaseDomain{

    private String name;
    private BigDecimal costprice;
    private BigDecimal saleprice;
    /**
     * 类型id
     */
    private Long typeId;
    private String resources;
    /**
     * 状态：0下架 1上架
     */
    private Integer state;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    private Date offsaletime;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    private Date onsaletime;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    private Date createtime = new Date();
    /**
     * 店铺Id 如果被领养店铺id为null
     */
    private Long shopId;
    /**
     * 如果被领养为领养用户id
     */
    private Long userId;
    //寻主消息id
    private Long searchMasterMsgId;

    //店铺名称
    private Shop shop;
    //用户名称
    private User user;
    //宠物类型
    private PetType petType;

    //1.列表查询时候将详细信息查询出来-映射 2.接收前端传递的详细宠物信息参数
    private PetDetail petDetail;

}
